﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<List<Brjostagjof_H4.Models.Entry>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">Brjóstagjöf.is | Fréttir</asp:Content>

<asp:Content  ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h3>Fréttir</h3>
    <table id="main-table">
            <tr>

                <td id="main-table-left">
                    <% foreach (var item in Model)
                       { %>
                            <div class="news-preview-container">
                                <div class="news-preview-date"><%: DateTime.Parse( item.posted.ToString() ) %></div>
                                <div>
                                    <div class="news-preview-title"><%= Html.ActionLink(item.title, "ViewNews", new { id = item.ID })%></div>
                                    <div class="news-preview-content"><%: item.content %></div>
                                </div>
                            </div>
                    <% } %>
                </td>

                <td id="main-table-right">
                    <% Html.RenderPartial("Sidebar"); %>
                </td>

            </tr>
    </table>

</asp:Content>

